package org.onepiece.admin.common.exception;

import org.onepiece.admin.common.errorcode.ServiceCode;

/**
 * Created by IntelliJ IDEA.
 *
 * @author zhujianke@gaodun.com
 * @since 2023/2/19 20:49
 */
public class CommonException extends RuntimeException {

    private static final long serialVersionUID = 4984183235550868398L;

    private ServiceCode serviceCode;

    public CommonException(ServiceCode serviceCode) {
        super(serviceCode.getInfo());
        this.serviceCode = serviceCode;
    }

    public ServiceCode getServiceCode() {
        return serviceCode;
    }

    public void setServiceCode(ServiceCode serviceCode) {
        this.serviceCode = serviceCode;
    }
}
